<div class="modal-header">
    <h3>{{config.formConfig.title}}</h3>
</div>
<form name="thisForm" class="form-horizontal" ng-submit="submit(thisForm.$valid)" novalidate="novalidate">
    <div class="modal-body">

        <ot-form form="config.form" data="data" form-root="thisForm"></ot-form>

    </div>
    <div class="modal-footer">

        <div class="ot-alert-{{message.type}} alert-dismissable ot-dialog-alert" ng-show="message">
            <span>{{message.content}}</span>
        </div>

        <!-- Additional buttons -->
        <button class="btn btn-default" type="button"
                ng-repeat="button in config.formConfig.buttons"
                ng-disabled="button.actionRunning"
                ng-click="buttonAction(button)">
            <span class="ot-loading-indicator" ng-show="button.actionRunning"></span>
            {{button.title}}
        </button>

        <button class="btn btn-primary ot-dialog-ok" type="submit" ng-disabled="thisForm.$invalid || submitting">
            <span class="ot-loading-indicator" ng-show="submitting"></span>
            OK
        </button>
        <button class="btn btn-link ot-dialog-cancel" type="button" ng-click="cancel()">Cancel</button>
    </div>
</form>